﻿// /*------------------------------------------------------------
// 工程名:    Ensemble2D
// 文件名:    PathHelper.cs
// 编写人:    yhh
// 编写日期: 下午 9:44
// -------------------------------------------------------------*/

using System.IO;
using System.Reflection;
using Ensemble;

namespace Ensemble2D
{
    public static class PathHelper
    {
        private static string executingBinDir;
        public static string ExecutingAssemblyDir
        {
            get
            {
                if (string.IsNullOrEmpty(executingBinDir))
                {
                    var entryAssembly = Assembly.GetEntryAssembly() ?? typeof(EnsembleApp).Assembly;
                    executingBinDir = Path.GetFullPath(Path.GetDirectoryName(entryAssembly.Location));
                }
                return executingBinDir;
            }
        }
    }
}